﻿using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using WPFExcelReport.Helpers;
namespace WPFExcelReport
{
    public partial class TVAWSPATTERN
    {
       

        public TVAWSPATTERN()
        {

            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VVAART();
            this.DataContext = MV;
            InitializeComponent();
        
        }
        public override void LOADBYAUF()
        {
            TBMain.Clear();
            if (ORDERNUM.Length < 29)
                return;
            KOLL = ORDERNUM.Substring(0, 5);
            ART = ORDERNUM.Substring(5, 24);
            dwData = TBMain.NewRow();

            dwData["VAAMANDANT"] = app.Mandant;
            dwData["VAAKOLL"] = KOLL; 
            dwData["VAAART"] = ART.Trim(); 
            SResult = TMV.QueryVAART(dwData, 7);
            MergeData(SResult, true);
        } 
    }
}
